<template>
  <el-dialog :title="添加价格政策" :close-on-click-modal="false" :inline="true" :visible.sync="visible">
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="80px">
      <el-row>
        <el-col :span="5">入住当天24点前：</el-col>
        <el-col :span="4">
          <el-form-item prop="preHour">
            <el-input v-model="dataForm.preHour" placeholder="提前多少小时"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="7">小时前退订，收取订单总额</el-col>
        <el-col :span="4">
          <el-form-item prop="fine">
            <el-input v-model="dataForm.fine" placeholder="收取多少手续费"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">%的违约金</el-col>
      </el-row>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">取消</el-button>
      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      visible: false,
      dataForm: {
        preHour: '',
        fine: ''
      },
      dataRule: {
        preHour: [
          { required: true, message: '提前多少小时', trigger: 'blur' }
        ],
        fine: [
          { required: true, message: '收取多少手续费', trigger: 'blur' }
        ]
      }
    }
  },
  methods: {
    init() {
    },
    // 表单提交
    dataFormSubmit() {

    }
  }
}
</script>
